<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/app}">
<head>
    <title>注册</title>
</head>
<body class="bg-gradient-primary">
    <div class="container" layout:fragment="content">
        <!-- Outer Row -->
        <div class="card o-hidden border-0 shadow-lg my-5">
            <div class="card-body p-0">
                <!-- Nested Row within Card Body -->
                <div class="row">
                    <div class="col-lg-5 d-none d-lg-block bg-register-image"></div>
                    <div class="col-lg-7">
                        <div class="p-5">
                            <div class="text-center">
                                <h1 class="h4 text-gray-900 mb-4">注册</h1>
                            </div>
                            <form class="user" th:action="@{/register}" th:method="post">
                                <div class="form-group">
                                    <input type="text" name="mobile" class="form-control form-control-user" id="exampleInputMobile" placeholder="手机号" required>
                                </div>
                                <div class="form-group">
                                    <input type="text" name="user_name" class="form-control form-control-user" id="exampleInputUserName" placeholder="昵称" required>
                                </div>
                                <div class="form-group row">
                                    <div class="col-sm-6 mb-3 mb-sm-0">
                                        <input type="password" name="password" class="form-control form-control-user" id="exampleInputPassword" placeholder="密码" required>
                                    </div>
                                    <div class="col-sm-6">
                                        <input type="password" name="confirm_password" class="form-control form-control-user" id="exampleRepeatPassword" placeholder="确认密码" required>
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-primary btn-user btn-block">
                                    注 册
                                </button>
                                <hr>
                            </form>
                            <p style="color: red;text-align: center" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
                            <hr>

                            <div class="text-center">
                                <a class="small" th:href="@{/login.html}">已有账号 前往登录</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>